package user

import (
	"fmt"
	db "gsc-datasets/internal/db/dao"
	pgdb "gsc-datasets/internal/db/sqlc"
)

func (s *UserRouter) convUser(u *pgdb.User) *pgdb.User {
	if u.Avatar.Valid {
		u.Avatar = db.JNSFromString(fmt.Sprintf("%s%s", s.GetCosBucketCustomCDNDomain(), u.Avatar.String))
	}
	return u
}
